﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderView.aspx.cs" Inherits="HQWeb.View.Order.OrderView" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../Styles/OrderViewStyle.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript">
        //缩放功能
        function expandcollapse(obj, row) {
            var div = document.getElementById(obj);
            var img = document.getElementById(row);
            if (div.style.display == "none") {
                div.style.display = "";
                if (img != null) {
                    img.src = "../../Images/more.gif";
                    img.alt = "关闭显示";
                }

            }
            else {
                div.style.display = "none";
                if (img != null) {
                    img.src = "../../Images/more.gif";
                    img.alt = "显示下级菜单";
                }
            }
        }
        function FillStyle() {
            var styles = document.getElementById("hidStytle").value;

            styles = styles.split(",");
            for (var i = 0; i < styles.length; i++) {
                var varCheckBox = document.getElementById(styles[i]);
                if (varCheckBox != undefined) {
                    varCheckBox.checked = true;
                }
            }
        }
    </script>
    <style type="text/css">
        .Divstyle
        {
            font: normal 12px auto "Trebuchet MS" , Verdana, Arial, Helvetica, sans-serif;
            background: #EEF2FB;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div style="width: 90%; text-align: center" class="Divstyle" runat="server" id="idDiv">
        <table width="90%" style="text-align: center">
            <tr>
                <td colspan="3" class="title">
                    <asp:Label runat="server" Font-Size="Large" Font-Bold="true" ID="labTitle" Text="订单"></asp:Label>
                </td>
                <td>
                    <input type="button" id="btnBack" value="返回" onclick="javascript:history.go(-1);" />
                    <asp:Button ID="btnOut" runat="server" Text="导出World" OnClick="btnOut_Click" />
                    <asp:Button ID="btnOutExcel" runat="server" Text="导出Excel" 
                        onclick="btnOutExcel_Click"  />
                </td>
            </tr>
            </table>
            <div id="orderview">
            <table width="90%" style="text-align: center">
            <tr>
                <td align="right" style="width: 20%">
                    庆典类型：
                </td>
                <td style="width: 25%; text-align: left">
                    <%--                                <asp:DropDownList runat="server" ID="orderType">
                                </asp:DropDownList>
                                <input type="button" value="选择存在订单" onclick="GetEditOrder()" />--%>
                    <asp:Label runat="server" ID="laborderType"></asp:Label>
                </td>
                <td align="right" style="width: 20%">
                    服务日期：
                </td>
                <td align="left">
                    <asp:Label runat="server" ID="labDate"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right">
                    新郎姓名：
                </td>
                <%-- <th style="width: 12%;" align="right">
                    新郎姓名：
                </th>--%>
                <td align="left">
                    <asp:Label ID="txtGROOM_NAME" runat="server"></asp:Label>
                </td>
                <td align="right">
                    新娘姓名：
                </td>
                <%--  <th style="width: 12%;" align="right">
                    新娘姓名：
                </th>--%>
                <td align="left">
                    <asp:Label ID="txtBRIDE_NAME" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right">
                    新郎年龄：
                </td>
                <%--  <th align="right">
                    新郎年龄：
                </th>--%>
                <td align="left">
                    <asp:Label ID="txtGROOMAGE" runat="server"></asp:Label>
                </td>
                <td align="right">
                    新娘年龄：
                </td>
                <td align="left">
                    <asp:Label ID="txtBRIDEAGE" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right">
                    新郎电话：
                </td>
                <%-- <th align="right">
                    新郎电话：
                </th>--%>
                <td align="left">
                    <asp:Label ID="txtGROOMPHONE" runat="server"></asp:Label>
                </td>
                <td align="right">
                    新娘电话：
                </td>
                <%-- <th align="right">
                    新娘电话：
                </th>--%>
                <td align="left">
                    <asp:Label ID="txtBRIDEPHONE" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right">
                    新郎QQ：
                </td>
                <%--<th align="right">
                    新郎QQ：
                </th>--%>
                <td align="left">
                    <asp:Label ID="txtGROOMQQ" runat="server"></asp:Label>
                </td>
                <td align="right">
                    新娘QQ：
                </td>
                <%--<th align="right">
                    新娘QQ：
                </th>--%>
                <td align="left">
                    <asp:Label ID="txtBRIDEQQ" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right">
                    新房地址：
                </td>
                <td align="left">
                    <asp:Label ID="txtHOUSEADDRESS" runat="server"></asp:Label>
                </td>
                <td align="right">
                    娘家地址：
                </td>
                <td align="left">
                    <asp:Label ID="txtBRIDEADDRESS" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right" class="style1">
                    服务地址：
                </td>
                <td align="left" class="style1">
                    <asp:Label ID="txtHOTEL" runat="server"></asp:Label>
                </td>
                <td align="right">
                    酒店接待人员：
                </td>
                <td align="left">
                    <asp:Label ID="txtHOTELMANAGE" runat="server"></asp:Label>
                </td>
            </tr>
            <tbody id="MoreInformation">
                <tr>
                    <td align="right">
                        新郎职务：
                    </td>
                    <%-- <th align="right">
                        新郎职务：
                    </th>--%>
                    <td align="left">
                        <asp:Label ID="txtGROOMPOST" runat="server"></asp:Label>
                    </td>
                    <td align="right">
                        新娘职务：
                    </td>
                    <td align="left">
                        <asp:Label ID="txtBRIDEPOST" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        婚纱照交接情况：
                    </td>
                    <td align="left">
                        <asp:Label ID="txtWEDDING" runat="server"></asp:Label>
                    </td>
                    <td align="right">
                        婚车负责人：
                    </td>
                    <td align="left">
                        <asp:Label ID="txtMARRIAGECAR" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        桌数：
                    </td>
                    <td align="left">
                        <asp:Label ID="txtTABLENUM" runat="server"></asp:Label>
                    </td>
                    <td align="right">
                        来宾中长辈数：
                    </td>
                    <td align="left">
                        <asp:Label ID="txtELDER" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        新房地址：
                    </td>
                    <td align="left">
                        <asp:Label ID="txtRANK" runat="server"></asp:Label>
                    </td>
                    <td align="right">
                        来宾中后辈数：
                    </td>
                    <td align="left">
                        <asp:Label ID="txtYOUNGER" runat="server"></asp:Label>
                    </td>
                </tr>
            </tbody>
            <tr>
                <td align="right">
                    风格:
                </td>
                <td colspan="3" runat="server" id="controls">
                </td>
            </tr>
            <tr>
                <td align="right">
                    备注:
                </td>
                <td colspan="3" align="left">
                    <asp:Label runat="server" ID="txtOther"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right">
                    市面金额:
                </td>
                <td colspan="3" align="left" runat="server" id="money">
                    <asp:Label ID="txtTotal" runat="server"></asp:Label>&nbsp;&nbsp; 签单金额：<asp:Label
                        ID="textRealTotal" runat="server"></asp:Label>&nbsp;&nbsp; 定金：<asp:Label ID="txtDinJin"
                            runat="server"></asp:Label>&nbsp;&nbsp; 已交金额：<asp:Label ID="txtTotalUp" runat="server"></asp:Label>&nbsp;&nbsp;
                    未交金额:<asp:Label ID="txtUnpaid" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right">
                    接待人员：
                </td>
                <td align="left">
                    <asp:Label ID="labUserNmae" runat="server"></asp:Label>
                </td>
                  <td align="right" class="style1">
                    业务来源：
                </td>
                <td align="left" class="style1">
                    <asp:Label runat="server" ID="labFrom"></asp:Label>
                </td>
            </tr>
               <tr>
                    <td align="right">
                        纪念类型：
                    </td>
                    <%-- <th align="right">
                        新郎职务：
                    </th>--%>
                    <td align="left">
                        <asp:Label ID="txtMEMORIALTYPE" runat="server"></asp:Label>
                    </td>
                    <td align="right">
                        纪念日期：
                    </td>
                    <td align="left">
                        <asp:Label ID="txtMEMORIALDAY" runat="server"></asp:Label>
                    </td>
                </tr>
            <tr>
                <td colspan="4" align="left">
                    项目：
                    <hr />
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <asp:GridView ID="GridView1" CssClass="OrderViewStyle" runat="server" AutoGenerateColumns="False"
                        AllowPaging="false" Width="100%" CellPadding="4" EmptyDataText="没有数据记录！！" GridLines="None"
                        DataKeyNames="a" OnRowDataBound="GridView1_RowDataBound">
                        <Columns>
                            <asp:TemplateField ItemStyle-Width="5%">
                                <ItemTemplate>
                                    <a href="javascript:expandcollapse('div<%# Eval("a") %>', '<%#Eval("a")%>');">
                                        <img id="imgdiv<%# Eval("a") %>" alt="点击显示/隐藏下级菜单 " width="9px" border="0" src="../../Images/expand_blue.jpg" />
                                    </a>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField ControlStyle-Width="80" HeaderText="图片" ItemStyle-Height="80px">
                                <ItemTemplate>
                                    <asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("URLThumbnail")==DBNull.Value? "../../Images/Element/nophoto.bmp":Eval("URLThumbnail")%>'
                                        Width="79px" Height="79px" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="b" HeaderText="项目名称" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Center">
                                <ItemStyle Width="25%"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="d" HeaderText="所属分类" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Center">
                                <ItemStyle Width="25%"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="c" HeaderText="价 格" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
                                <ItemStyle Width="10%"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="f" HeaderText="数量" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
                                <ItemStyle Width="10%"></ItemStyle>
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="操作" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25%">
                                <ItemTemplate>
                                    <a onclick="RemoveProject('<%#Eval("a")%>')" style="cursor: pointer">移除</a>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <tr>
                                        <td colspan="100%">
                                            <div id="div<%# Eval("a") %>" style="display: none; position: relative; left: 15px;
                                                overflow: auto; width: 97%">
                                                <asp:GridView ID="GridView2" AllowPaging="False" AllowSorting="true" BackColor="White"
                                                    Width="100%" AutoGenerateColumns="false" Font-Names="Verdana" runat="server"
                                                    DataKeyNames="a" ShowFooter="true" BorderStyle="Double" BorderColor="#0083C1">
                                                    <RowStyle BackColor="Gainsboro" />
                                                    <AlternatingRowStyle BackColor="White" />
                                                    <HeaderStyle BackColor="#0083C1" ForeColor="White" />
                                                    <FooterStyle BackColor="White" />
                                                    <Columns>
                                                        <asp:BoundField DataField="c" HeaderText="名称 " ItemStyle-HorizontalAlign="Center" />
                                                        <asp:BoundField DataField="b" HeaderText="数量 " ItemStyle-HorizontalAlign="Center" />
                                                        <asp:BoundField DataField="d" HeaderText="类型 " ItemStyle-HorizontalAlign="Center" />
                                                    </Columns>
                                                </asp:GridView>
                                            </div>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle CssClass="OrderViewFooterStyle" />
                        <RowStyle CssClass="OrderViewRowStyle" />
                        <SelectedRowStyle CssClass="OrderViewSelectedRowStyle" />
                        <PagerStyle CssClass="OrderViewPagerStyle" />
                        <AlternatingRowStyle CssClass="OrderViewAlternatingRowStyle" />
                        <HeaderStyle CssClass="OrderViewHeaderStyle" />
                    </asp:GridView>
                </td>
            </tr>
            <tr>
                <td colspan="4" align="left">
                    物品清单:
                    <hr />
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <asp:GridView ID="GridView3" CssClass="OrderViewStyle" runat="server" AutoGenerateColumns="False"
                        AllowPaging="false" Width="100%" CellPadding="4" EmptyDataText="没有数据记录！！" GridLines="None">
                        <Columns>
                            <asp:TemplateField HeaderText="序号" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <%#Container.DisplayIndex +1%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="TYPE_NAME" HeaderText="物品类别" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Center">
                                <ItemStyle Width="30%"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="MATERIAL_NAME" HeaderText="物品名称" ItemStyle-Width="30%"
                                ItemStyle-HorizontalAlign="Center">
                                <ItemStyle Width="30%"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="total" HeaderText="数量" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Center">
                                <ItemStyle Width="25%"></ItemStyle>
                            </asp:BoundField>
                        </Columns>
                        <FooterStyle CssClass="OrderViewFooterStyle" />
                        <RowStyle CssClass="OrderViewRowStyle" />
                        <SelectedRowStyle CssClass="OrderViewSelectedRowStyle" />
                        <PagerStyle CssClass="OrderViewPagerStyle" />
                        <AlternatingRowStyle CssClass="OrderViewAlternatingRowStyle" />
                        <HeaderStyle CssClass="OrderViewHeaderStyle" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        </div>
        <div>
            <asp:HiddenField ID="hidStytle" runat="server" />
            <asp:HiddenField ID="hidProjectID" runat="server" />
        </div>
    </div>
    </form>
</body>
</html>
